package easy;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

public class Solution_453 {

    public int minMoves(int[] nums) {
        /*int count = 0, min = Integer.MAX_VALUE;
        for (int i = nums.length - 1; i >= 0; i--) {
            min = Math.min(min, nums[i]);
        }
        for (int i = nums.length - 1; i >= 0; i--) {
            int sub = nums[i] - min;
            count += sub;
        }
        return count;*/
        int moves = 0, min = Integer.MAX_VALUE;
        for (int i = 0; i < nums.length; i++) {
            moves += nums[i];
            min = Math.min(min, nums[i]);
        }
        return moves - min * nums.length;
    }

    public static void main(String[] args) {
//        Solution_453 model = new Solution_453();
//        System.out.println(model.minMoves(new int[]{1, 1000}));
//        Date date1 = new Date(2021, 06, 22);
//        Date date2 = new Date(2021, 06, 22);
//        System.out.println(date1.before(date2));
        List<String> list = new ArrayList<>();

        int[] exist = new int[]{304, 885, 1400, 987, 1261, 1025, 693, 988, 695, 1026, 694, 692, 488, 1109, 722, 675, 1107, 479, 496, 486, 963, 664, 677, 991, 480, 964, 473, 962, 1110, 961, 721, 1402, 1349, 303, 1348, 1399, 489, 1401, 1108, 1347, 1359, 829, 527, 883, 523, 520, 533, 884, 309, 3252, 849};
        int[] all = new int[]{30, 230, 303, 304, 309, 396, 434, 473, 477, 479, 480, 486, 488, 489, 496, 520, 523, 527, 532, 533, 664, 675, 677, 692, 693, 694, 695, 719, 721, 722, 746, 750, 829, 849, 875, 881, 883, 884, 885, 912, 936, 961, 962, 963, 964, 987, 988, 991, 1011, 1025, 1026, 1107, 1108, 1109, 1110, 1111, 1210, 1212, 1261, 1267, 1272, 1330, 1347, 1348, 1349, 1354, 1359, 1362, 1375, 1380, 1399, 1400, 1401, 1402, 1403, 1446, 1447, 3016, 3079, 3177, 3187, 3189, 3201, 3209, 3252, 3282, 3299, 3302};

        for (int i : all) {
            boolean flag = false;
            for (int i1 : exist) {
                if (i1 == i) {
                    flag = true;
                }
            }
            if (!flag) {
                list.add(i + "");
            }
        }

        System.out.println(list.stream().collect(Collectors.joining(",")));
    }
}
